package org.chaiyi.template.core.common.contract;

import org.chaiyi.template.core.common.exception.BusinessError;

public interface Contractor {
    interface Error {
        BusinessError CREATE_ONE_METHOD_NOT_IMPLEMENTED = error("01-0001", "创建方法未实现");
        BusinessError FIND_BY_ID_METHOD_NOT_IMPLEMENTED = error("01-0002", "通过ID查询方法未实现");
        BusinessError QUERY_METHOD_NOT_IMPLEMENTED = error("01-0003", "query方法未实现");
        BusinessError COUNT_METHOD_NOT_IMPLEMENTED = error("01-0004", "count方法未实现");
        BusinessError DELETE_METHOD_NOT_IMPLEMENTED = error("01-0005", "delete方法未实现");
        BusinessError MODIFY_METHOD_NOT_IMPLEMENTED = error("01-0006", "modify方法未实现");
        static BusinessError error(String code, String message) {
            return new BusinessError(code, message);
        }

    }
}
